package ru.spbau.bytecode;

import java.awt.EventQueue;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

import ru.spbau.bytecode.graph.GraphBuilder;
import ru.spbau.bytecode.graph.io.XMLGraphIO;
import ru.spbau.bytecode.gui.MainWindow;
import ru.spbau.bytecode.projectobserver.ClassesObserver;
import ru.spbau.bytecode.projectobserver.CompositeObserver;
import ru.spbau.bytecode.projectobserver.PackagesObserver;

public class Main {

	public static void main(String[] args) throws IOException {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				List<GraphBuilder> graphBuilders = new LinkedList<GraphBuilder>();
				graphBuilders.add(new ClassesObserver());
				graphBuilders.add(new PackagesObserver());
				graphBuilders.add(new CompositeObserver());
				
				XMLGraphIO graphIO = new XMLGraphIO();
				new MainWindow(graphBuilders, graphIO, graphIO);
			}
		});
	}
}